import 'swiper/swiper-bundle.min.css';
import './slider.css';
import Swiper from 'swiper/swiper-bundle.min';

import config, {LAYOUT_ID, SWIPER_CONTAINER_CLASS, URL} from './config';
import {getData} from 'api/getData';
import render from './slider.art';

getData(URL)
	.then(data => {
		document.getElementById(LAYOUT_ID).innerHTML = render({
			...config,
			...{
				images: data,
			},
		});
		new Swiper(SWIPER_CONTAINER_CLASS, config);
	});

